// 商品列表
<template>
    <div>
        <Row class="page">
            <Col span="24">
            <Button type="primary" icon="plus-round">新增分类</Button>
            </Col>
        </Row>
        <br>
        <Row class="page">
            <Col span="24">
            <Table border :columns="columns7" :data="data6"></Table>
            </Col>
        </Row>
    </div>
</template>

<script type="text/ecmascript-6">
    export default {
        data() {
            return {
                 modal1: false,
                columns7: [{
                        title: '商品名称',
                        key: 'spmc',
                        render: (h, params) => {
                            return h('div', [
                                h('strong', params.row.name)
                            ]);
                        }
                    },
                    {
                        title: '所属分类',
                        key: 'ssfl'
                    },
                     {
                        title: '商品数量',
                        key: 'spsl'
                    },
                    {
                        title: '操作',
                        key: 'caozuo',
                        width: 150,
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        marginRight: '5px'
                                    },
                                    on: {
                                        click: () => {
                                            this.show(params.index)
                                        }
                                    }
                                }, '编辑'),
                                h('Button', {
                                    props: {
                                        type: 'error',
                                        size: 'small'
                                    },
                                    on: {
                                        click: () => {
                                            this.remove(params.index)
                                        }
                                    }
                                }, '删除')
                            ]);
                        }
                    }
                ],
                data6: [{
                        name: 'John Brown',
                        spsl: 18,
                        ssfl:'会员卡'
                    },
                    {
                        name: 'Jim Green',
                        spsl: 24,
                         ssfl:'优惠券'
                    },
                    {
                        name: 'Joe Black',
                        spsl: 30,
                         ssfl:'大保健'
                    },
                    {
                        name: 'Jon Snow',
                        spsl: 26,
                         ssfl:'VIP会员'
                    }
                ]
            }
        },
        methods:{
             ok () {
                this.$Message.info('Clicked ok');
            },
            cancel () {
                this.$Message.info('Clicked cancel');
            }
        }
    }
</script>

<style scoped>

</style>
